<?php


namespace app\common\model\search;


trait ProjectSearch
{
    public function searchStatusAttr($query, $value, $data)
    {
        return $query->where('status', (int)$value);
    }

    public function searchNameAttr($query, $value, $data)
    {
        return $query->where('name', "=", $value);
    }

    public function searchModeAttr($query, $value, $data)
    {
        return $query->where('mode', $value);
    }

    public function searchParentIdAttr($query, $value, $data)
    {
        return $query->where('parentId', $value);
    }


}